#ifndef ssd1306_h
#define ssd1306_h

#include "main.h"

class ssd1306
{
private:
    uint8_t ssd1306_addr_ = 0x78, write_comment_ = 0, write_data_ = 0x40;
    uint8_t origin_[3] = {0xb0, 0, 0x10};
    uint8_t init_[28] = {0xae, 0x20, 0x10, 0xb0, 0xc8, 0, 0x10, 0x40, 0x81, 0, 0xa1, 0xa6, 0xa8, 0x3f, 0xa4, 0xd3, 0, 0xd5, 0xf0, 0xd9, 0x22, 0xda, 0x12, 0xdb, 0x20, 0x8d, 0x14, 0xaf};
    I2C_HandleTypeDef *hi2c_;

public:
    void init(I2C_HandleTypeDef *hi2c);
    void display(uint8_t *data);
};

#endif